/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.wors.android.multirideshare.view;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.TextView;
import cz.wors.android.multirideshare.activity.R;

/**
 *
 * @author 231260
 */
public class CellText extends TextView {
	
	String driver;
	String passenger;
	String table_name;
	
	public CellText(Context context)
	{
		super(context);
	}
	
	public CellText(Context context, AttributeSet attrs)
	{
		super(context, attrs);
		initCellText(attrs);
	}
	
	public CellText(Context context, AttributeSet attrs, int defStyle)
	{
		super(context, attrs, defStyle);
		initCellText(attrs);
	}
	
	private void initCellText(AttributeSet attrs) {
		TypedArray a = getContext().obtainStyledAttributes(attrs,R.styleable.KalendarButton);
		
		driver = a.getString(R.styleable.CellText_driver);
		passenger = a.getString(R.styleable.CellText_passenger);
		table_name = a.getString(R.styleable.CellText_table_name);
		
		a.recycle();
	}

	public String getDriver() {
		return driver;
	}

	public void setDriver(String driver) {
		this.driver = driver;
	}

	public String getPassenger() {
		return passenger;
	}

	public void setPassenger(String passenger) {
		this.passenger = passenger;
	}

	public String getTable_name() {
		return table_name;
	}

	public void setTable_name(String table_name) {
		this.table_name = table_name;
	}
}
